﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Student
    {
        private int Num;
        private string Name;
        private int Age;

        public int Num1 { get => Num; set => Num = value; }
        public string Name1 { get => Name; set => Name = value; }
        public int Age1 { get => Age; set => Age = value; }
        public Student (int Num,string Name,int Age)
        {
            this.Num = Num;
            this.Name = Name;
            this.Age = Age;
            if (this.Age<=0 || this.Age >128)
            {
                this.Age = 0;
            }
        }
        public void will()
        {
            Console.WriteLine("我的学号是：{0},我的姓名是{1},我的年龄是：{2}",this.Num,this.Name,this.Age );
        }
    }
}
